DJPEG

Section: User Commands (1)
Updated: 11 December 1991
Index Return to Main Contents
 

NAME

djpeg - decompress a JPEG file to an image file  

SYNOPSIS

djpeg [ -GPRTbgD2d ] [ -q N ] [ filename ]

 

DESCRIPTION

djpeg decompresses the named JPEG file, or the standard input if no file is named, and produces an image file on the standard output. PPM, GIF, Targa, or RLE output format can be selected. (RLE is supported only if the URT library is available.)

The color quantization algorithm is currently shoddy. Because of this, the GIF output mode is not recommended in the current release, except for gray-scale output (obtained with -g).  

OPTIONS

-G
Select GIF output format (implies -q, with default of 256 colors). Currently the color quantization uses a shoddy algorithm and external quantization (e.g. ppmquant, rlequant) is recommended before conversion to GIF format.
-P
Select PPM or PGM output format (this is the default). PGM is emitted if the JPEG file is gray-scale or if -g is specified.
-R
Select RLE output format. Requires URT library.
-T
Select Targa output format. Gray-scale format is emitted if the JPEG file is gray-scale or if -g is specified; otherwise, colormapped format is emitted if -q is specified; otherwise, 24-bit full-color format is emitted.
-b
Perform cross-block smoothing. This is quite memory-intensive and only seems to improve the image at low quality settings (-Q 10 to 20 or so). At normal -Q settings it may make the image worse.
-g
Force gray-scale output even if input is color.
-q N
Quantize to N colors.
-D
Do not use dithering in color quantization. By default, Floyd-Steinberg dithering is applied when quantizing colors, but on some images dithering may result in objectionable "graininess". If that happens, you can turn off dithering with -D.
-2
Use two-pass color quantization (not yet supported).
-d
Enable debug printout. More -d's give more output. Also, version information is printed at startup.
 

EXAMPLES

This example decompresses the JPEG file foo.jpg and saves the output as a gray-scale image in foo.pgm:

djpeg -g foo.jpg > foo.pgm
 

SEE ALSO

cjpeg(1)
ppmquant(1) [From the PBMplus distribution]
rlequant(1) [From the Utah Raster Toolkit distribution]
Wallace, Gregory K. "The JPEG Still Picture Compression Standard", Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.  

AUTHOR

Independent JPEG Group  

BUGS

djpeg currently uses a shoddy color quantization algorithm. This leads to poor GIF file output. Two-pass color quantization is not yet supported.

Arithmetic coding is not supported for legal reasons.

Not as fast as we'd like.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 23:15:03 GMT, January 29, 2023